﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Draco.OWF.RT;

namespace Draco.OWF.Acticity
{
    public class EmptyActivity : AbstractActivity
    {
        public override ITask CreateActivityInstance()
        {
            return new EmptyActivityInstance(this);
        }
        public override string ActivityType
        {
            get { return "Activity.EmptyActivity"; }
        }

        public class EmptyActivityInstance : AbstractActivityInstance
        {
            public EmptyActivityInstance(IActivity activity)
                : base(activity)
            { }
            public override bool Excute(IJobContext context)
            {
                Console.WriteLine("excute EmptyActivity");
                this.Status = ActivityStatus.Completed;
                return true;
            }
        }

        public override void SerializeConfiguration(System.Xml.XmlElement parent)
        {
        }

        public override void DeserializeConfiguration(System.Xml.XmlElement parent)
        {
        }
    }
}
